package com.hmall.order.untils;

/**
 * ThreadLocal工具类
 *
 * @Author Json.D
 * @Date 2022/8/12 15:00
 * @Blog
 * @Description: ThreadLocal工具类
 */
public class ThreadLocalUntils {

    public static ThreadLocal<String> tl = new ThreadLocal<>();

    public static void setUserId(String userId) {
        tl.set(userId);
    }

    public static String getUserId() {
        return tl.get();
    }

    public static void  remove(){
        tl.remove();
    }
}
